package com.vtech;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

import javax.swing.*;

@Slf4j
@SpringBootApplication
public class OntExplorerApplication {

    public static void main(String[] args) {

        try {
//            UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
            for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (Exception e) {
            System.out.println("Nimbus Look And Feel not available");
            log.info("Nimbus Look And Feel not available");
        }
        //        这里与web项目不一样
        ConfigurableApplicationContext context = new SpringApplicationBuilder(
                OntExplorerApplication.class).headless(false)
                .web(false) //completely disable the Web Server behaviour.
                .run(args);
    }
}
